/*
 * (c) 2021 <tang-haifeng@foxmail.com> <pengren.mcu@qq.com>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 *
 */

#ifndef __LSGD1B20_BPD1_V10_CONFIG_H
#define __LSGD1B20_BPD1_V10_CONFIG_H

#include "ls1b_core.h"

#define CONFIG_LOONGSON_BOARD_NAME "LSGD1B20_BPD1_V10"

/* 串口打印信息，汇编调试 */
#define CONFIG_PRINTK
#ifndef CONFIG_DM_SERIAL
#define CONFIG_CPU_UART
#define CONFIG_CONS_INDEX	5
#define CONFIG_SYS_NS16550_SERIAL
#define CONFIG_SYS_NS16550_REG_SIZE	 1
#define CONFIG_SYS_NS16550_CLK	0
#endif
#define CONFIG_SYS_NS16550_COM5	 0xbfe7c000
#define LS1X_UART_DEBUG_BASE	CONFIG_SYS_NS16550_COM5

/* Ethernet driver configuration */
#if defined(CONFIG_LOONGSON_GMAC) || defined(CONFIG_ETH_DESIGNWARE)
#define LOONGSON_GMAC0_EN
#define LOONGSON_GMAC1_EN
#define CONFIG_DW_GMAC_DEFAULT_DMA_PBL 4
#define CONFIG_DW_ALTDESCRIPTOR
#define LOONGSON_GMAC_PHY_MODE PHY_INTERFACE_MODE_MII
#define LOONGSON_GMAC0_100M
#define LOONGSON_GMAC1_100M
#define PHY_ANEG_TIMEOUT	8000
#endif

#define	CONFIG_EXTRA_ENV_SETTINGS					\
	CONSOLE_STDOUT_SETTINGS \
	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
	"splashpos=m,m\0" \
	"video=" "ls1xfb:1024x600-16@60" "\0" \
	"panel0=" "hk070r21b01" "\0" \
	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"					\
	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"				\
	"menucmd=bootmenu\0" \
	"bootmenu_0=Update kernel=updatemenu kernel 1\0" \
	"bootmenu_1=Update rootfs=updatemenu rootfs 1\0" \
	"bootmenu_2=Update u-boot=updatemenu uboot 1\0" \
	"bootmenu_3=Update ALL=updatemenu all 1\0" \
	"bootmenu_delay=10\0"

#define CONFIG_IPADDR			192.168.1.20
#define CONFIG_NETMASK			255.255.255.0
#define CONFIG_SERVERIP			192.168.1.2

#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(30 * 1000)

#endif	/* __LSGD1B20_BPD1_V10_CONFIG_H */
